<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="css/dialog.css" />
	</head>
	<body>
		<button type="button" id="openDialog">点我打开对话框</button>

		<script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script>
		<script src="js/dialog.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$("#openDialog").dialog({
				id: "superDialog",   //必填,必须和已有id不同
				title: "我的标题",   //对话框的标题 默认值: 我的标题
				type: 0, //0 对话框有确认按钮和取消按钮 1 对话框只有关闭按钮
				easyClose: true, // 点击遮罩层也可以关闭窗口,默认值false
				form: [{
					description: "用户名",
					type: "text",
					name: "username",
					value:"tom"
				}, {
					description: "密码",
					type: "text",
					name: "password",
					value:"123456"
				}], //form 是填充表单的数据,必填
				submit: function(data) {
					//data是表单收集的数据
					console.log(data);
				}
			})
		</script>
		
	</body>
</html>